package cn._2dland.websocket.io;

import java.io.FilterOutputStream;
import java.io.IOException;
import java.io.OutputStream;

import cn._2dland.websocket.model.message.Message;

/**
 * 报文输出流，封装了对报文的写入
 * 
 * @author deadblue
 */
public abstract class MessageOutputStream extends FilterOutputStream {

	public MessageOutputStream(OutputStream out) {
		super(out);
	}

	/**
	 * 向输出流中写入一个报文
	 * 
	 * @param msg
	 */
	public abstract void writeMessage(Message msg) throws IOException;
}
